package com.learn.eduorder.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.learn.eduapi.entity.order.PayOrderRecord;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

@Repository
public interface PayOrderRecordDao extends BaseMapper<PayOrderRecord> {
    @Update("update pay_order_record set type = #{type},to_status = #{toStatus} where order_no = #{orderNo}")
    int updatePayOrderRecord(PayOrderRecord payOrderRecord);

    @Select("select * from pay_order_record where order_no = #{orderNo}")
    PayOrderRecord selectByOrderId(@Param("orderNo")Integer orderNo);
}
